package com.hsylient.aop.controller;

import com.hsylient.aop.entity.Order;
import com.hsylient.aop.service.OrderService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
public class OrderController {

    @Resource
    private OrderService orderService;

    @GetMapping("/v3/message")
    public String getMessage() {
        return "Hello Word";
    }


    @GetMapping("/v3/order")
    public Order getOrderInfo() {
        return orderService.findOrder();
    }


    @GetMapping("/v3/test/customer/annotation")
    public String testCustomerAnnotation(@RequestParam String param) {
        return orderService.testCustomerAnnotation(param);
    }

}
